package com.lostandfound.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lostandfound.dao.ItemDao;
import com.lostandfound.entity.ItemType;
import com.lostandfound.service.ItemService;

@Service("itemService")
@Transactional
public class ItemServiceImpl implements ItemService {
	
	@Autowired
	private ItemDao itemDao;

	@Override
	public Serializable save(ItemType obj) {
		return itemDao.save(obj);
	}

	@Override
	public void update(ItemType obj) {
		itemDao.update(obj);
	}

	@Override
	public void delete(ItemType obj) {
		itemDao.delete(obj);
	}

	@Override
	public ItemType selectByPrimary(Long id) {
		return itemDao.selectByPrimary(id);
	}

	@Override
	public List<?> listItemByPage(Map<String, Object> pagemap) {
		return itemDao.listItemByPage(pagemap);
	}

	@Override
	public void deleteItemByBranch(Long[] items) {
		itemDao.deleteItemByBranch(items);
	}

	@Override
	public List<?> getAllItem() {
		return itemDao.getAllItem();
	}

	@Override
	public int getCount() {
		return itemDao.getCount();
	}

}
